home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / pdc / include / math.h < prev    next >
C/C++ Source or Header  |  1990-04-05  |  3KB  |  81 lines

  1. /*
  2.  * Libraries and headers for PDC release 3.3 (C) 1989 Lionel Hummel.
  3.  * PDC Software Distribution (C) 1989 Lionel Hummel and Paul Petersen.
  4.  * PDC I/O Library (C) 1987 by J.A. Lydiatt.
  5.  *
  6.  * This code is freely redistributable upon the conditions that this 
  7.  * notice remains intact and that modified versions of this file not
  8.  * be included as part of the PDC Software Distribution without the
  9.  * express consent of the copyright holders.  No warrantee of any
  10.  * kind is provided with this code.  For further information, contact:
  11.  *
  12.  *  PDC Software Distribution    Internet:                     BIX:
  13.  *  P.O. Box 4006             or hummel@cs.uiuc.edu            lhummel
  14.  *  Urbana, IL  61801-8801       petersen@uicsrd.csrd.uiuc.edu
  15.  */
  16.  
  17. /* math.h - standard C math functions and constants */
  18.  
  19. extern double    modf();        /* Integer and remainder        */
  20. extern double    ldexp();    /* load the exponent            */
  21. extern double    frexp();    /* retrieve the exponent        */
  22.  
  23. extern double    acos();        /* inverse trigonometric function    */
  24. extern double    asin();        /* inverse trigonometric function     */
  25. extern double    atan();        /* inverse trigonometric function    */
  26. extern double    atan2();    /* inverse trigonometric function     */
  27. extern double    cos();        /* trigonometric function        */
  28. extern double    sin();        /* trigonometric function        */
  29. extern double    tan();        /* trigonometric function        */
  30.  
  31. extern double    acosh();    /* inverse hyperbolic function        */
  32. extern double    asinh();    /* inverse hyperbolic function        */
  33. extern double    atanh();    /* inverse hyperbolic function        */
  34.  
  35. extern double    cosh();        /* hyperbolic function            */
  36. extern double    tanh();        /* hyperbolic function             */
  37. extern double    sinh();        /* hyperbolic function            */
  38. extern double    cabs();        /* complex absolute value        */
  39.  
  40. extern double    cbrt();        /* cube root                */
  41. extern double    sqrt();        /* square root                */
  42. extern double    hypot();    /* Euclidean distance            */
  43.  
  44. extern double    fabs();        /* absolute value            */
  45. extern double    floor();    /* integer no greater than        */
  46. extern double    ceil();        /* integer no less than            */
  47. extern double    rint();        /* round to nearest integer        */
  48.  
  49. extern double    drem();        /* remainder                */
  50. extern double    copysign();    /* copy sign bit            */
  51. extern double    logb();        /* exponent extraction            */
  52. extern double    scalb();    /* exponent adjustment            */
  53.  
  54. extern double    exp();        /* exponential                */
  55. extern double    expm1();    /* exp(x)-1                */
  56. extern double    log();        /* natural logarithm            */
  57. extern double    log10();    /* logarithm to base 10            */
  58. extern double    log1p();    /* log(1+x)                */
  59. extern double    pow();        /* exponential x**y            */
  60.  
  61. #ifndef MAXDOUBLE
  62.  
  63. #define BITS(type)    (8 * (int)sizeof(type))
  64.  
  65. #define MAXDOUBLE    1.79769313486231470e+308
  66. #define MAXFLOAT    ((float)3.40282346638528860e+38)
  67. #define MINDOUBLE    4.94065645841246544e-324
  68. #define MINFLOAT    ((float)1.40129846432481707e-45)
  69.  
  70. #define DMINEXP    (-(DMAXEXP + DSIGNIF - 4))
  71. #define FMINEXP    (-(FMAXEXP + FSIGNIF - 4))
  72.  
  73. #define DSIGNIF    (BITS(double)-11)
  74. #define FSIGNIF    (BITS(float)-8)
  75.  
  76. #define DMAXEXP    (1 << 11 - 1)
  77. #define FMAXEXP    (1 << 8 - 1)
  78.  
  79. #endif
  80.  
  81.